package com.shijunhao.graduation.service.business;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shijunhao.graduation.domain.dto.DiscussDto;
import com.shijunhao.graduation.domain.entity.BusinessForumDiscuss;
import com.shijunhao.graduation.domain.vo.DiscussVo;
import com.shijunhao.graduation.service.system.BaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-04-16
 */
public interface IBusinessForumDiscussService extends BaseService<BusinessForumDiscuss> {
    /**
     * @param curPage: 当前页数
     * @param fid: 论坛id
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.shijunhao.graduation.domain.vo.DiscussVo>
     * @author: shijunhao
     * @date: 2022/4/19 2:27
     * @description: 获取论坛评论分页实体
     */
    IPage<DiscussVo> page(IPage<BusinessForumDiscuss> curPage, Long fid);

    /**
     * @param entity: 评论实体
     * @return: com.shijunhao.graduation.domain.vo.DiscussVo
     * @author: shijunhao
     * @date: 2022/4/19 2:28
     * @description: 转评论显示对象
     */
    DiscussVo toVo(BusinessForumDiscuss entity);

    /**
     * @param dto: 论坛评论插入实体
     * @return: java.lang.Long
     * @author: shijunhao
     * @date: 2022/4/19 3:07
     * @description: 插入一条论坛评论
     */
    Long insert(DiscussDto dto);

    /**
     * @param id: 评论id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/27 4:27
     * @description: 删除对应评论
     */
    boolean delete(Long id);
}
